<template>
  <div class="main">
      <div>
          <router-view></router-view>
    </div>
    <van-tabbar v-model="menuName">
      <van-tabbar-item name="index" icon="home-o" @click="handel">首页</van-tabbar-item>
      <van-tabbar-item name="offline" icon="search"  @click="handel">线下就诊预约</van-tabbar-item>
      <van-tabbar-item name="order" icon="friends-o"  @click="handel">门诊预约</van-tabbar-item>
      <van-tabbar-item name="setUp"  icon="setting-o"  @click="handel">设置</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      menuName: 'index'
    }
  },
  methods: {
    handel () {
      this.$router.push('/' + this.menuName)
    }
  }
}
</script>

<style scoped>
.main {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
</style>
